<template>
  <div class="home">
    <h2 class="title">所有组件</h2>
    <div class="links">
      <router-link
        style="margin: 10px"
        v-for="route in routes"
        :key="route"
        :to="route"
        >{{ route }}</router-link
      >
    </div>
  </div>
</template>

<script>
import folders from '@/folders'
export default {
  name: 'Home',
  data() {
    return {
      routes: [],
    }
  },
  created() {
    this.routes = folders
  },
}
</script>

<style lang="less" scoped>
.home {
  text-align: center;
  .links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
}
</style>
